package com.chuantou.yuba.api.to;

import java.util.List;

import com.chuantou.yuba.util.Constants;
import com.google.gson.annotations.SerializedName;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 约钓详情TO
 * 
 * @author dl1001
 * 
 */
public class FishingDetailTO implements Parcelable {
	// 约钓详细信息
	@SerializedName("detail")
	private FishingTO detail;
	// 参与人数总计
	@SerializedName("members_total")
	private int memberTotalCount;
	// 参与成员列表
	@SerializedName("members")
	private List<FishingUserTO> members;
	// 评论总数
	@SerializedName("comments_total")
	private int commentCount;
	// 评论列表
	@SerializedName("comments")
	private List<FishingCommentTO> comments;
	// 当前页码
	@SerializedName("p")
	private int currentPage;

	public FishingDetailTO() {
	}

	public FishingDetailTO(Parcel source) {
		// TODO 需要序列化时再做
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO 需要序列化时再做
	}

	public static final Creator<FishingDetailTO> CREATOR = new Creator<FishingDetailTO>() {

		@Override
		public FishingDetailTO[] newArray(int size) {
			return new FishingDetailTO[size];
		}

		@Override
		public FishingDetailTO createFromParcel(Parcel source) {
			return new FishingDetailTO(source);
		}
	};

	public boolean hasNextPage(){
		return comments != null && comments.size() >= Constants.DEFAULT_PAGE_SIZE;
	}
	
	public FishingTO getDetail() {
		return detail;
	}

	public void setDetail(FishingTO detail) {
		this.detail = detail;
	}

	public int getMemberTotalCount() {
		return memberTotalCount;
	}

	public void setMemberTotalCount(int memberTotalCount) {
		this.memberTotalCount = memberTotalCount;
	}

	public List<FishingUserTO> getMembers() {
		return members;
	}

	public void setMembers(List<FishingUserTO> members) {
		this.members = members;
	}

	public int getCommentCount() {
		return commentCount;
	}

	public void setCommentCount(int commentCount) {
		this.commentCount = commentCount;
	}

	public List<FishingCommentTO> getComments() {
		return comments;
	}

	public void setComments(List<FishingCommentTO> comments) {
		this.comments = comments;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

}
